Optimal. Leaf size=39 \[ x \left (a^2-b^2\right )-\frac{2 a b \log (\cos (c+d x))}{d}+\frac{b^2 \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0564281, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.107, Rules used = {3086, 3477, 3475} \[ x \left (a^2-b^2\right )-\frac{2 a b \log (\cos (c+d x))}{d}+\frac{b^2 \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3086
Rule 3477
Rule 3475
Rubi steps
\begin{align*} \int \sec ^2(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx &=\int (a+b \tan (c+d x))^2 \, dx\\ &=\left (a^2-b^2\right ) x+\frac{b^2 \tan (c+d x)}{d}+(2 a b) \int \tan (c+d x) \, dx\\ &=\left (a^2-b^2\right ) x-\frac{2 a b \log (\cos (c+d x))}{d}+\frac{b^2 \tan (c+d x)}{d}\\ \end{align*}
Mathematica [C] time = 0.123585, size = 69, normalized size = 1.77 \[ \frac{2 b^2 \tan (c+d x)-i \left ((a+i b)^2 \log (-\tan (c+d x)+i)-(a-i b)^2 \log (\tan (c+d x)+i)\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.095, size = 57, normalized size = 1.5 \begin{align*}{a}^{2}x-{b}^{2}x+{\frac{{b}^{2}\tan \left ( dx+c \right ) }{d}}-2\,{\frac{ab\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+{\frac{{a}^{2}c}{d}}-{\frac{{b}^{2}c}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.69376, size = 66, normalized size = 1.69 \begin{align*} \frac{{\left (d x + c\right )} a^{2} -{\left (d x + c - \tan \left (d x + c\right )\right )} b^{2} - a b \log \left (-\sin \left (d x + c\right )^{2} + 1\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.493956, size = 146, normalized size = 3.74 \begin{align*} \frac{{\left (a^{2} - b^{2}\right )} d x \cos \left (d x + c\right ) - 2 \, a b \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right ) + b^{2} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a \cos{\left (c + d x \right )} + b \sin{\left (c + d x \right )}\right )^{2} \sec ^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15995, size = 59, normalized size = 1.51 \begin{align*} \frac{a b \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + b^{2} \tan \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )}{\left (d x + c\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]